package com.ml.mall.mapper.variant;

import com.ml.mall.bean.req.variant.VariantRecommendQueryReq;
import com.ml.mall.bean.req.variant.VariantRecommendQueryShopReq;
import com.ml.mall.bean.res.product.SysProductShopPageRes;
import com.ml.mall.bean.res.variant.VariantRecommendQueryRes;
import com.ml.mall.entity.variant.SysProductVariantRecommend;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* <p>
    *  Mapper 接口
    * </p>
*
* @author kyyang
* Created 2021-05-31
*/
@Mapper
@Repository
public interface SysProductVariantRecommendMapper extends BaseMapper<SysProductVariantRecommend> {

    //查询全部推荐对象
    List<VariantRecommendQueryRes> queryAllRecommend(@Param("req") VariantRecommendQueryReq req);

    //分页查询推荐的商品；一次查询出所有的产业；再筛选；一次只支持查询一中情况
    List<SysProductShopPageRes> queryVariantRecommendShop(@Param("req") VariantRecommendQueryShopReq req);

    //将被逻辑删除的推荐信息物理删除
    void cleanOne(@Param("variantId") Long variantId);
}
